package com.luguangtao.controller;

import com.github.pagehelper.PageInfo;
import com.luguangtao.api.StuApiTest;
import com.luguangtao.entity.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
public class StudentController {

    @Autowired
    StuApiTest stuApiTest;

    @RequestMapping("lists")
    public PageInfo<Student> lists(){
        PageInfo<Student> lists = stuApiTest.lists();
        return lists;
    }
}
